<template>
    <div class="container" @click="handleGallaryClick">
        <div class="wrapper">
            <!-- <swiper :options="swiperOption" class="swiper-container" v-if="hasImg">
                <swiper-slide v-for="item in gallaryImgs" :key="item">
                    <img :src="item" alt="">
                </swiper-slide>
                <div class="swiper-pagination" slot="pagination"></div>
            </swiper> -->
            <!-- <img v-for="item of gallaryImgs" :src="item" :key='item'> -->
            <!-- 111 -->
        </div>
    </div>
</template>
<script>
import { computed } from 'vue'
export default {
  name: 'Gallary',
  // props: {
  //   gallaryImgs: {
  //     type: Array
  //   }
  // },
  setup(props, context){
    // let swiperOption = {
    //   pagination: '.swiper-pagination',
    //   loop: true,
    //   observer: true,
    //   observeParents: true
    // }
    // let hasImg = computed(()=>{
    //   return props.gallaryImgs.length
    // })
    function handleGallaryClick () {
      context.emit('close')
    }
    return {handleGallaryClick}
    // return { swiperOption, hasImg, handleGallaryClick } 
  }
}
</script>
<style lang="stylus" scoped>
.container
    z-index 99
    position fixed
    top 0
    bottom 0
    left 0
    right 0
    background-color #000
    display flex
    flex-direction column
    justify-content center
    .wrapper
        background pink
        width 100%
        height 0
        padding-bottom 100%
        img
            width 100%
</style>
